package com.xayy.health.mgt.mapper;

import com.xayy.health.core.config.datasource.DatasourceSelector;
import com.xayy.health.mgt.model.CalculateData;
import com.xayy.health.mgt.model.TaskInfo;
import com.xayy.health.mgt.model.TelemetryData;
import com.xayy.health.mgt.model.dto.TelemetryDto;
import com.xayy.health.mgt.model.vo.ResultDataVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangxa
 */
public interface CalculateDataMapper {
    /**
     * 删除预测数据
     *
     * @param taskInfo 任务对象
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void deleteCalculateData(@Param("taskInfo") TaskInfo taskInfo);

    /**
     * 根据子任务id删除预测数据
     *
     * @param taskChildIds 子任务对象
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void deleteCalculateDataByIds(@Param("taskChildIds") List<Long> taskChildIds);

    /**
     * 删除预测数据
     *
     * @param taskInfo 任务对象
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void deleteDataList(@Param("taskInfo") TaskInfo taskInfo);

    /**
     * 获取结果数据
     * @param resultDataVo 查询条件
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<CalculateData> selectResultData(@Param("resultDataVo") ResultDataVo resultDataVo);
}